package com.bwie.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @Description
 * @Author 36167
 * @Date 2025/3/19 15:42
 **/


@Component
public class RabbitConfig {

    @Bean
    public DirectExchange directExchange(){
        return new DirectExchange("day3-19",true,false,null);
    }

    @Bean
    public Queue queue(){
        return new Queue("day3-19",true,false,false,null);
    }

    @Bean
    public Queue queue1(){
        return new Queue("xd",true,false,false,null);
    }
    @Bean
    public Queue queue2(){
        return new Queue("tk",true,false,false,null);
    }

    @Bean
    public Binding binding(){
        return BindingBuilder.bind(queue()).to(directExchange()).with("xty");
    }
    @Bean
    public Binding binding1(){
        return BindingBuilder.bind(queue1()).to(directExchange()).with("xd");
    }
    @Bean
    public Binding binding2(){
        return BindingBuilder.bind(queue2()).to(directExchange()).with("tk");
    }
}
